<template>
  <div ref="di">
    <v-md-preview :text="markdown" ref="preview" />
  </div>
</template>

<script>
import loadFile from "@/util/getFile.js";
import bus from "@/eventbus.js";
import VueMarkdownEditor, { xss } from "@kangc/v-md-editor";
export default {
  props: ["FilePath"],
  data() {
    return {
      html: this.FilePath,
      aa: "",
      markdown: "",
      titles: [],
    };
  },
  async created() {
    const res = await this.$http.get(this.html);
    this.markdown = res.data;
    console.log("设置完成");
    bus.emit("mdPreview", this.$refs.preview);
  },
  updated() {},
};
</script>

<style scoped>
div {
  height: 100%;
}
</style>
